
# 指向昇腾软件包安装地址，导出环境变量
if [ ! $ASCEND_HOME_DIR ]; then
    ASCEND_HOME_DIR=/home/greatpan/software/Ascend_cann_toolkit/ascend-toolkit/latest/
    source $ASCEND_HOME_DIR/../set_env.sh
fi

# UT Test
build_ut() {
    export ASCEND_CUSTOM_PATH=$ASCEND_HOME_DIR
    ./build.sh -u tik2
}
# build_ut

# Compile and deploy
compile_and_deploy() {
    ./pack.sh
}
compile_and_deploy

# ST Test
build_st() {
    export DDK_PATH=/home/greatpan/software/Ascend_cann_toolkit/ascend-toolkit/latest/
    export NPU_HOST_LIB=/home/greatpan/software/Ascend_cann_toolkit/ascend-toolkit/6.3.RC2.alpha002/runtime/lib64/stub

    cd /home/greatpan/software/Ascend_cann_toolkit/ascend-toolkit/6.3.RC2.alpha002/python/site-packages/bin/
    ./msopst run -i $HOME/cann_op_contrib/community/tests/add_tik2/st/add_tik2.json -soc Ascend910A -out $HOME/out
}
# build_st
